import request from '@/request/request'

// 班次
export function classesList(data) {
	return request({
		url: '/business/shift/getAll',
		method: 'get',
		data: data
	})
}

// 周期班
export function cycleList(data) {
	return request({
		url: '/business/cycleShift/list',
		method: 'get',
		data: data
	})
}
export function cycleAllList(data) {
	return request({
		url: '/business/cycleShift/getAll',
		method: 'get',
		data: data
	})
}
// 中间日期
export function getClasses(data) {
	return request({
		url: '/business/shiftSchedule/list',
		method: 'get',
		data: data
	})
}
// 选择雇主
export function userList(data) {
	return request({
		url: '/business/employee/base/pageListByEmployer',
		method: 'get',
		data: data
	})
}
// 选择人
export function employeeList(data) {
	return request({
		url: '/business/employee/base/pageListByEmployer',
		method: 'get',
		data: data
	})
}

// 批量排班保存
export function batchUpdate(data) {
	return request({
		url: '/business/shiftSchedule/batchSchedule',
		method: 'POST',
		data: data
	})
}

// 假期申请
export function applyLeave(data) {
	return request({
		url: '/h5/jqVacation/applyLeave',
		method: 'post',
		data: data
	})
}
// 查询 当前雇员 拥有得假期
export function getPersonHolidays(data) {
	return request({
		url: '/h5/jqVacation/getEmployeeHolidaysOwned',
		method: 'get',
		data: data
	})
}

// 审批
export function audit(data) {
	return request({
		url: '/h5/audit',
		method: 'post',
		data: data
	})
}
// 审批申请取消
export function cancel(data) {
	return request({
		url: '/h5/cancel',
		method: 'post',
		data: data
	})
}
// 提交取消请假--审批完成后
export function applyCancelLeave(data) {
	return request({
		url: '/h5/jqVacation/applyCancelLeave',
		method: 'post',
		data: data
	})
}
// 审批列表
export function getApplyList(data) {
	return request({
		url: '/h5/auditList',
		method: 'get',
		data: data
	})
}

// 我的绩效
export function getPerformance(data) {
	return request({
		url: '/h5/jxPerformance/getMyPerformanceList',
		method: 'get',
		data: data
	})
}

// 绩效打分
export function getPerformanceScoreList(data) {
	return request({
		url: '/h5/jxPerformance/getPerformanceScorList',
		method: 'get',
		data: data
	})
}

// 打卡
export function punchIn(data) {
	return request({
		url: '/h5/punchIn',
		method: 'post',
		data: data
	})
}
// 新增班次
export function Addclasses(data) {
	return request({
		url: '/business/shift',
		method: 'post',
		data: data
	})
}
// 修改
export function updateclasses(data) {
	return request({
		url: '/business/shift',
		method: 'put',
		data: data
	})
}
// 删除
export function delclasses(id) {
	return request({
		url: `/business/shift/${id}`,
		method: 'delete',
	})
}

// 周期班新增
export function Addcycle(data) {
	return request({
		url: '/business/cycleShift',
		method: 'post',
		data: data
	})
}

export function updatecycle(data) {
	return request({
		url: '/business/cycleShift',
		method: 'put',
		data: data
	})
}

export function delcycle(id) {
	return request({
		url: `/business/cycleShift/${id}`,
		method: 'delete',
	})
}

// 绩效详情
export function tableDe(id) {
	return request({
		url: `/table/table/${id}`,
		method: 'get',
	})
}

// 绩效打分
export function performanceScore(data) {
	return request({
		url: `/h5/jxPerformance/evaluationScoring`,
		method: 'post',
		data: data
	})
}

// 个人中心
export function personalCenter(data) {
	return request({
		url: `/personal/center`,
		method: 'get',
		data: data
	})
}
// 考勤记录
export function getAttendance(data) {
	return request({
		url: `/h5/attendanceRecordByDay`,
		method: 'get',
		data: data
	})
}

// 假期列表
export function getPersonHolidaysList(data) {
	return request({
		url: `/h5/jqVacation/getEmployeeLeavePage`,
		method: 'get',
		data: data
	})
}
// 操作日志
export function getOperationLog(data) {
	return request({
		url: `/h5/getMyOperationLog`,
		method: 'get',
		data: data
	})
}
// 我的更表
export function getMySchedule(data) {
	return request({
		url: `/h5/getMySchedule`,
		method: 'get',
		data: data
	})
}

// 获取假期天数
export function personHolidaysNum(data) {
	return request({
		url: `/h5/personHolidaysNum`,
		method: 'get',
		data: data
	})
}
// 加班申请
export function applyOvertime(data) {
	return request({
		url: `/h5/overtimeApply`,
		method: 'get',
		data: data
	})
}
//当天的考勤记录
export function getTodayAttendanceRecord(data) {
	return request({
		url: `/h5/punchRecord`,
		method: 'get',
		data: data
	})
}

// 申请修改
export function changeClockInTime(data) {
	return request({
		url: `/h5/changeSignTime`,
		method: 'get',
		data: data
	})
}

// 考勤打卡记录大列表
export function getAttendanceRecordList(data) {
	return request({
		url: `/h5/punchRecord`,
		method: 'get',
		data: data
	})
}

// 获取审批流程
export function getApprovalName(data) {
	return request({
		url: `/h5/getReviewerList`,
		method: 'get',
		data: data
	})
}
// 获取职位信息
export function positionLists(data) {
	return request({
		url: `/system/position/list`,
		method: 'get',
		data: data
	})
}


// 绩效详情
export function getPerformanceInfo(data) {
	return request({
		url: `/h5/jxPerformance/getPerformanceEmployeeDetail`,
		method: 'get',
		data: data
	})
}
// 查询打分题目
export function getPerformanceEmployeeTopic(data) {
	return request({
		url: `/h5/jxPerformance/getPerformanceEmployeeTopic`,
		method: 'get',
		data: data
	})
}
//绩效 存草稿
export function saveDraftEvaluationScoring(data) {
	return request({
		url: '/h5/jxPerformance/saveDraftEvaluationScoring',
		method: 'post',
		data: data
	})
}

// 我的消息
export function getMessage(data) {
	return request({
		url: `/h5/getMyMessage`,
		method: 'get',
		data: data
	})
}
// 获取所属雇主信息
export function getEmployer(data) {
	return request({
		url: `/business/employer/getAllEmployer`,
		method: 'get',
		data: data
	})
}

// 假期剩余
export function getHolidayRemaining(data) {
	return request({
		url: `/business/jqVacationReport/list`,
		method: 'get',
		data: data
	})
}

// 编辑排版
export function updateC(data) {
	return request({
		url: `/business/shiftSchedule/editSchedule`,
		method: 'post',
		data: data
	})
}
// 排班发布
export function isPub(data) {
	return request({
		url: `/business/shiftSchedule/isPub`,
		method: 'post',
		data: data
	})
}

// 消息详情
export function getMessageInfo(data) {
	return request({
		url: `/h5/getMessageInfo`,
		method: 'get',
		data: data
	})
}
export function getCycleShiftAll(data) {
	return request({
		url: `/business/cycleShift/getAll`,
	})
}

// 查询计算 请假时长
export function computeLeaveDays(data) {
	return request({
		url: `/h5/jqVacation/computeLeaveDays`,
		method: 'get',
		data: data
	})
}

// 查询 当前雇员 请假记录 涉及到得假期
export function getEmployerLeaveVacation(data) {
	return request({
		url: `/h5/jqVacation/getEmployerLeaveVacation`,
		method: 'get',
		data: data
	})
}
// 查询 同事假期
export function leavelists(data) {
	return request({
		url: `/h5/jqVacation/getColleagueVacation`,
		method: 'get',
		data: data
	})
}

// 打卡类型
export function getPunchInType() {
	return request({
		url: `/h5/getPunchInType`,
		method: 'get',
	})
}
export function attendanceRecordByDay(data) {
	return request({
		url: `/h5/attendanceRecordByDay`,
		method: 'get',
		data
	})
}
export function attendanceCardApply(data) {
	return request({
		url: `/h5/attendanceCardApply`,
		method: 'get',
		data
	})
}
export function judgeLocation(data) {
	return request({
		url: `/h5/judgeLocation`,
		method: 'post',
		data
	})
}
export function reviewerType(data) {
	return request({
		url: `/h5/reviewerType`,
		method: 'get',
		data
	})
}
export function getAttendanceType(data) {
	return request({
		url: `/business/shift/getAttendanceType`,
		method: 'get',
		data
	})
}

